User Guides > PCC with Legacy Services (Proxy Server) > Integrating with Your Application > Configuring HTML5 Samples > JSP Samples |
JSP samples are based on C# samples implementing objects of PccViewerServices Library Module.
JSP Samples requires Apache Tomcat 6 or higher to be installed. Apache Ant™ 1.9 or higher and Java JDK 1.6 is required compile the sample WAR file.
The structure of the JSP samples is described in following table:
build.xml | Ant build script. |
PccViewerServices/ | Sub-module with PccViewerServices library implementation. |
Sample/ | Web module with JSP and Java code. |
Sample/public_html/ | Web resources folder, it stores the JSP sample files. |
Sample/public_html/WEB-INF/lib/ | Sample web application runtime libraries folder. |
target/ | Folder created by build.xml script. It contains compiled and assembled code, i.e. PCCSample.war. |
Use following files to configure the web application:
It might be necessary to configure the values in web.xml to fit your local Prizm Service installation.
Following table describes the Prizm configuration parameter values and its purpose:
Parameter Name (param-name) | Parameter Value (param-value) | Description |
EnableDocumentPath |
|
When set to True, this parameter restricts the web tier samples to load documents from the path specified by DocumentPath. Otherwise, it allows loading documents from any path. |
DocumentPath |
|
Path where the source documents are located. |
TempcachePath |
|
Path where the temporary cache files are located. |
MarkupsPath |
|
Path where the temporary markup files are located. |
WebServiceScheme | http | Prizm Service REST API web service scheme. |
WebServiceHost | localhost | Prizm Service REST API web service hostname. |
WebServicePort | 18680 | Prizm Service Proxy REST API web service port number. |
The JSP samples can be compiled using Apache Ant™ compiler.
On Windows, this can be achieved by executing the following set of commands on command line terminal (cmd.exe):
Copy Code
|
|
---|---|
cd C:\Prizm\Samples\Html5\jsp set ANT_HOME=C:\apache-ant-1.9.0 set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_43 set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin; ant clean ant war |
Note that the above example commands assume:
On Linux, please refer to documentation how to install Apache Ant™ as described at http://ant.apache.org/manual/index.html.
Then, issue the ant compiler commands inside JSP sample root folder, e.g.:
Copy Code
|
|
---|---|
# cd /usr/share/prizm/Samples/html5/jsp/ # ant clean # ant war |
The result of a successful build is the PCCSample.war file located in target folder under JSP sample root folder.
Follow the Tomcat documentation instructions on how to redeploy newly compiled PCCSample.war.